package com.supreme.studyserver.component;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;
import java.util.Set;

@Slf4j
@Component
public class QumApplicationRunner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) throws Exception {
        List<String> nonOptionArgs = args.getNonOptionArgs();
        System.out.println("QumApplicationRunner nonOptionArgs = " + nonOptionArgs);
        String[] sourceArgs = args.getSourceArgs();
        System.out.println("QumApplicationRunner sourceArgs = " + Arrays.toString(sourceArgs));
        Set<String> optionNames = args.getOptionNames();
        System.out.println("QumApplicationRunner optionNames = " + optionNames);

        log.trace("trace");
        log.debug("debug");
        log.info("info");
        log.warn("warn");
        log.error("error");
    }
}
